import { wxLogin } from '../../entity/auth'
import { makeAccessMember } from '../../entity/member'

const app = getApp()

Page({
  data: {},
  async onLoad() {
    await wxLogin() // 应用启动时登录
    app.member = await makeAccessMember() // 应用启动时登录

    console.log('member', app.member)
  },
  async onTap(e) {
    await app.member.refreshProfile()
    console.log('on-member', app.member)
  },
})
